; (function (window, undefined) {
    // undefined防止不兼容
    let jQuery = function (el) { 
      let els = document.querySelectorAll(el)
      for (let i = 0; i < els.length; i++) {
        this[i] = els[i]
      }
      this.length = els.length
    }

    jQuery.prototype = {
      css(cssAttr, cssVal) {
        for (let i = 0; i < this.length; i++) {
          this[i].style[cssAttr] = cssVal 
        }
        return this
      },
      ajax(options) { },
      attr(options) { },
      addClass(options) { },
    }
    window.jQuery = window.$ = jQuery
  })(window)
